<%@page import="java.security.SecureRandom"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<script type="text/javascript">
/**
 * 刷新验证码
 */
 	function reloadCode(){
	    var time = new Date().getTime();
		document.getElementById("imgCode").src="<%=request.getContextPath()%>/VerifyCode.shtml?d=" + time;
	}
	
	function checkLoginNoNull() {
		if ($.trim($("#verifycode").val()) == "") {
			alert("验证码不能为空！请重新输入！");
			return false;
		}
	}
</script>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, shrink-to-fit=no">
<base href="<%=basePath%>">
<title>Register</title>
<!-- Favicon  -->
<link rel="icon" href="/huahua/resources/images/core-img/favicon.ico">

<!-- Core Style CSS -->
<link rel="stylesheet" href="/huahua/resources/css/core-style.css">

</head>
<body>
	<!-- ##### Header Area Start ##### -->
	<header class="header_area">
		<div
			class="classy-nav-container breakpoint-off d-flex align-items-center justify-content-between">
			<!-- Classy Menu -->
			<nav class="classy-navbar" id="essenceNav">
				<!-- Logo -->
				<a class="nav-brand" href="index.jsp"><img
					src="/huahua/resources/images/core-img/logo.png" alt=""></a>
				<!-- Navbar Toggler -->
				<div class="classy-navbar-toggler">
					<span class="navbarToggler"><span></span><span></span><span></span></span>
				</div>
				<!-- Menu -->
				<div class="classy-menu">
					<!-- close btn -->
					<div class="classycloseIcon">
						<div class="cross-wrap">
							<span class="top"></span><span class="bottom"></span>
						</div>
					</div>
					<!-- Nav Start -->
					<div class="classynav">
						<ul>
							<li>
                                	<li><a href="#">Shop</a>
							  </li>
							<li><a href="http://localhost:8080/huahua/pages/front/login.jsp">Login</a></li>
						</ul>
					</div>
					<!-- Nav End -->
				</div>
			</nav>
			<!-- Header Meta Data -->
		

		</div>
	</header>
	<!-- ##### Header Area End ##### -->
	<!-- ##### Right Side Cart Area ##### -->
	<div class="cart-bg-overlay"></div>

	<div class="right-side-cart-area">

		<!-- Cart Button -->
		<div class="cart-button">
			<a href="#" id="rightSideCart"><img
				src="/huahua/resources/images/core-img/bag.svg" alt=""> <span>3</span></a>
		</div>

	
	</div>
	<!-- ##### Right Side Cart End ##### -->
	<!-- ##### Breadcumb Area Start ##### -->
	<div class="breadcumb_area bg-img"
		style="background-image: url(/huahua/resources/images/bg-img/breadcumb.jpg);">
		<div class="container h-100">
			<div class="row h-100 align-items-center">
				<div class="col-12">
					<div class="page-title text-center">
						<h2>Register</h2>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- ##### Breadcumb Area End ##### -->
	<!-- ##### Checkout Area Start ##### -->
	<div class="checkout_area section-padding-80">
		<div class="container">
			<div class="row">

				<div class="col-12 col-md-6">
					<div class="checkout_details_area mt-50 clearfix">

						<div class="cart-page-heading mb-30">
							<h5>注册账户</h5>
							<h5>${ error}</h5>
								<h5>${ status}</h5>
						</div>

						<form action="<%=basePath%>/user/register.shtml" method="post">
							<div class="row">
								<div class="col-md-6 mb-3">
									<label>用户名 <span>*</span></label> <input type="text"
										class="form-control" name="userName" placeholder="请输入用户名"  value="${errorMessage.userName==null?userInfo.userName:''}">
								<span style="color:red;">${requestScope.errorMessage.userName}</span>
								</div>
								<div class="col-md-6 mb-3">
									<label>密码<span>*</span></label> <input type="password"
										class="form-control" name="password" placeholder="请输入6-12位数字、字母或下划线"  value="${errorMessage.password==null?userInfo.password:''}">
								<span style="color:red;">${requestScope.errorMessage.password}</span>
								
								</div>
								<div class="col-md-6 mb-3">
									<label>电子邮箱：<span>*</span></label> <input type="text"
										class="form-control" name="address" placeholder="请输入电子邮箱"  value="${errorMessage.address==null?userInfo.address:''}">
								<span style="color:red;">${requestScope.errorMessage.address}</span>
								</div>
									<div class="col-md-6 mb-3">
									<label>地址：<span>*</span></label> <input type="text"
										class="form-control" name="dizhi" placeholder="请输入地址"  value="${errorMessage.dizhi==null?userInfo.dizhi:''}">
								<span style="color:red;">${requestScope.errorMessage.dizhi}</span>
								</div>
								<div class="col-md-6 mb-3">
									<label>电话：<span>*</span></label> <input type="text"
										class="form-control" name="tele" placeholder="请输入正确手机"  value="${errorMessage.tele==null?userInfo.tele:''}">
								<span style="color:red;">${requestScope.errorMessage.tele}</span>
								</div>


								
								<div class="col-md-6 mb-3">
									<label>验证码<span>*</span></label> 
									<input type="text"
										class="form-control" name="verifycode" /> 
								</div>
								
								
							<div class="col-md-6 mb-3">
									<br>
									
									<img src="<%=request.getContextPath()%>/VerifyCode.shtml"
										id="imgCode" alt="看不清楚？请点击刷新验证码"
										onclick="javascript:reloadCode();" />
								</div>
								
								
								
								
								
								
								
								
								<div class="col-12">

									<input class="btn essence-btn" type="submit" value="注册">
									<input class="btn essence-btn" type="reset" value="重置">


								</div>

							</div>

						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- ##### Checkout Area End ##### -->
	<!-- ##### Footer Area Start ##### -->
	<footer class="footer_area clearfix">
		<div class="container">
			<div class="row">
				<!-- Single Widget Area -->
				<div class="col-12 col-md-6">
					<div class="single_widget_area d-flex mb-30">
						<!-- Logo -->
						<div class="footer-logo mr-50">
							<a href="#"><img
								src="/huahua/resources/images/core-img/logo2.png" alt=""></a>
						</div>
						<!-- Footer Menu -->
						<div class="footer_menu">
							<ul>
								<li><a href="shop.html">Shop</a></li>
								<li><a href="blog.html">Blog</a></li>
								<li><a href="contact.html">Contact</a></li>
							</ul>
						</div>
					</div>
				</div>
				<!-- Single Widget Area -->
				<div class="col-12 col-md-6">
					<div class="single_widget_area mb-30">
						<ul class="footer_widget_menu">
							<li><a href="#">Order Status</a></li>
							<li><a href="#">Payment Options</a></li>
							<li><a href="#">Shipping and Delivery</a></li>
							<li><a href="#">Guides</a></li>
							<li><a href="#">Privacy Policy</a></li>
							<li><a href="#">Terms of Use</a></li>
						</ul>
					</div>
				</div>
			</div>

			<div class="row align-items-end">
				<!-- Single Widget Area -->
				<div class="col-12 col-md-6">
					<div class="single_widget_area">
						<div class="footer_heading mb-30">
							<h6>Subscribe</h6>
						</div>
						<div class="subscribtion_form">
							<form action="#" method="post">
								<input type="email" name="mail" class="mail"
									placeholder="Your email here">
								<button type="submit" class="submit">
									<i class="fa fa-long-arrow-right" aria-hidden="true"></i>
								</button>
							</form>
						</div>
					</div>
				</div>
				<!-- Single Widget Area -->
				<div class="col-12 col-md-6">
					<div class="single_widget_area">
						<div class="footer_social_area">
							<a href="#" data-toggle="tooltip" data-placement="top"
								title="Facebook"><i class="fa fa-facebook"
								aria-hidden="true"></i></a> <a href="#" data-toggle="tooltip"
								data-placement="top" title="Instagram"><i
								class="fa fa-instagram" aria-hidden="true"></i></a> <a href="#"
								data-toggle="tooltip" data-placement="top" title="Twitter"><i
								class="fa fa-twitter" aria-hidden="true"></i></a> <a href="#"
								data-toggle="tooltip" data-placement="top" title="Pinterest"><i
								class="fa fa-pinterest" aria-hidden="true"></i></a> <a href="#"
								data-toggle="tooltip" data-placement="top" title="Youtube"><i
								class="fa fa-youtube-play" aria-hidden="true"></i></a>
						</div>
					</div>
				</div>
			</div>

			<div class="row mt-5">
				<div class="col-md-12 text-center"></div>
			</div>

		</div>


	</footer>
	<!-- ##### Footer Area End ##### -->
	<!-- jQuery (Necessary for All JavaScript Plugins) -->
	<script src="/huahua/resources/js/jquery/jquery-2.2.4.min.js"></script>
	<!-- Popper js -->
	<script src="/huahua/resources/js/popper.min.js"></script>
	<!-- Bootstrap js -->
	<script src="/huahua/resources/js/bootstrap.min.js"></script>
	<!-- Plugins js -->
	<script src="/huahua/resources/js/plugins.js"></script>
	<!-- Classy Nav js -->
	<script src="/huahua/resources/js/classy-nav.min.js"></script>
	<!-- Active js -->
	<script src="/huahua/resources/js/active.js"></script>
</body>
</html>